package com.link.cloud.business.test.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.link.cloud.business.test.bean.Student;
import com.link.cloud.business.test.repository.StudentMapper;
import com.link.cloud.page.Paging;

@Service
public class StudentService {
	
	@Autowired
	private StudentMapper studentMapper;
	
	public Paging<Student> findAll(int pageNum,int pageSize){
		PageHelper.startPage(pageNum, pageSize);
		List<Student> students = studentMapper.findAll();
		return new Paging<Student>(students);
	}

}
